package com.jueling.culture.core;

/**
 * 响应结果生成工具
 * @author linp
 */
public class ResultGenerator {

    public static com.jueling.culture.core.Result genSuccessResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.Success);
    }

    public static com.jueling.culture.core.Result genSuccessResult(Object data) {
        return genSuccessResult().setResultData(data);
    }

    public static com.jueling.culture.core.Result genFrontShowResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.FrontShow);
    }

    public static com.jueling.culture.core.Result genFrontShowResult(String message) {
        return genFrontShowResult().setResultMsg(message);
    }

    public static com.jueling.culture.core.Result genSetupFailResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.setupFail);
    }

    public static com.jueling.culture.core.Result genFailResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.Fail);
    }

    public static com.jueling.culture.core.Result genFailResult(String message) {
        return genFailResult().setResultMsg(message);
    }

    public static com.jueling.culture.core.Result genBadResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.BadRequest);
    }

    public static com.jueling.culture.core.Result genBadResult(String message) {
        return genBadResult().setResultMsg(message);
    }

    public static com.jueling.culture.core.Result genUnauthorizedResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.Unauthorized);
    }

    public static com.jueling.culture.core.Result genAutoLoginFailResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.AutoLoginFail);
    }

    public static com.jueling.culture.core.Result genUnauthorizedResult(String message) {
        return genUnauthorizedResult().setResultMsg(message);
    }

    public static com.jueling.culture.core.Result genForbiddenResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.Forbidden);
    }

    public static com.jueling.culture.core.Result genLoginFailResult() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.LoginFail);
    }

    public static com.jueling.culture.core.Result genRefreshTokenFail(String message) {
        return genRefreshTokenFail().setResultMsg(message);
    }

    public static com.jueling.culture.core.Result genRefreshTokenFail() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.refreshTokenFail);
    }

    public static com.jueling.culture.core.Result genTokenExpired() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.TokenExpired);
    }

    public static com.jueling.culture.core.Result genFailOpen() {
        return new com.jueling.culture.core.Result(com.jueling.culture.core.ResultCode.FailOpen);
    }

    public static com.jueling.culture.core.Result genFailOpen(String message) {
        return genFailOpen().setResultMsg(message);
    }

}
